<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>  
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>

<tiles:insertDefinition name="defaultTemplate">
    <tiles:putAttribute name="body">
        <h3>Lanas</h3>
        
        <table border="1">
            <thead>
                <tr>
                    <th>Marca</th>
                    <th>Color</th>
                    <th>Referencia</th>
                    <th>Editar</th>
                    <th>Eliminar</th>                 
                </tr>
            </thead>
            <tbody>
                <c:forEach items="${lanas}" var="lana">
                    <tr>
                        <td><a href="/crochet/lana/mostrar/?id=${lana.id}"><c:out value="${lana.marca}" /></a></td>
                        <td><c:out value="${lana.color}" /></td>
                        <td><c:out value="${lana.referencia}" /></td>
                        <td><a href="/crochet/lana/editar/?id=${lana.id}">Editar</td>
                        <td><a href="/crochet/lana/eliminar/?id=${lana.id}">Eliminar</td>                       
                    </tr>
                </c:forEach>
            </tbody>
        </table>
        <a href="/crochet/lana/nuevo">Nueva Lana</a>
    </tiles:putAttribute>
</tiles:insertDefinition>